package com.chy.order_meal.service;

import com.chy.order_meal.dao.ExihibitionDao;
import com.chy.order_meal.po.Exhibition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExihibitionService {

    @Autowired
    public ExihibitionDao dao;

    public List<Exhibition> getBanner(){
        Pageable pageable =  PageRequest.of(0,6);
        return dao.getAllByType(1,pageable);
    }

}
